package homework13;

import java.util.ArrayList;
import java.util.Arrays;

public class home002 {
    public static void main(String[] args) throws Exception {
        ArrayList<Integer> list = new ArrayList<>(Arrays.asList(5,15,20,25,100,50,200,300,500,700,800));
        home02 home02=new home02(list);
        home02 home021=new home02(list);
        home02.setName("抽奖箱1");
        home021.setName("抽奖箱2");
        home02.start();
        home021.start();
        home02.join();
        home021.join();
        Integer max1=home02.getMaxprize();
        Integer max2=home021.getMaxprize();
        if(max1>max2){
            System.out.println("在此抽奖中,"+home02.getName()+"产生了最大奖项:"+max1+"元");
        }else{
            System.out.println("在此抽奖中,"+home021.getName()+"产生了最大奖项:"+max2+"元");

        }
    }
}
